package org.example.dubbo.pro.controller;

import org.example.dubbo.api.entity.User;
import org.example.dubbo.pro.service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("pro")
public class UserController {

    @Autowired
    UserServiceImpl userService;

    @RequestMapping("/user/{id}")
    public User getUserInfo(@PathVariable("id") long id){
       return userService.queryUserInfo(id);
    }
}
